#include "esptimer.h"

void esptim_callback(void *arg)
{
    LED_TOGGLE();
}

void esptimer_init(uint64_t tps)
{
    esp_timer_create_args_t esp_timer_init_struct={
        .callback=esptim_callback,
        .arg=NULL
    };
    esp_timer_handle_t esp_timer_handle;
    esp_timer_create(&esp_timer_init_struct,&esp_timer_handle);
    esp_timer_start_periodic(esp_timer_handle,tps);
}